path. This can is painful, for example, when you move your scripts from development to a production server.
There is a module called Findbin which solves this problem in the plain Perl world, but unfortunately up untill Perl 5.9.1 It won ' t work under Mod_perl, since it's a module and as any module it's loaded only once. So the first script using it would have all the settings correct, but the rest of the scripts would not if located in a diff Erent
, when you move your scripts from development to a production server.
There is a module calledFindbinWhich solves this problem in the plain Perl world, but unfortunately up untill Perl 5.9.1 it won't work under mod_perl, since it's a module and as any module it's loaded only once. so the first script using it will have all the settings correct, but the rest of the scripts will not if located in a different directory from the first. perl 5.9.1 provides a new functionFindbin: againWhich will do
relationship with the 11 point, it is doubtful that Perl has set the corresponding parameters, carefully look at the beginning of the execution script, found that the use of Findbin, If you don't know what to do, learn it. Fortunately, in the process of learning to solve my doubts and errors. Perl's Findbin module (be sure to look at the reference URL, very helpful) Point 1: Reference: Perl uses the
nbsp; aborted nbsp; .....
Modify the code to find a local path to the Modules library. Nbsp;
#! /Usr/bin/perl
Use nbsp; FindBin nbsp; qw ($ Bin );
Use nbsp; lib nbsp; "$ Bin ";
Use nbsp; DBI;
Print nbsp; "Hello nbsp; World! ";
View the directory of the control machine storage module, which is usually/usr/lib/perl5/xxx/site_perl or c: perlsite_perl. You will find a DBI in it. pm nbsp; copy this file directly to your machine. There is also a direct
@ ~/perl5 use local::lib ' ~/foo '; # Same, but ~/foo
# Or ... use findbin; Use Local::lib "$FindBin:: bin/. /support "; # app-local Support library use Findbin; Use Lib "$FindBin:: bin/. /lib ";
# or use Findbin QW ($Bin); Use Lib "$Bin/.. /lib ";
Three find the installed
Reference Link: http://stackoverflow.com/questions/841785/how-do-i-include-a-perl-module-thats-in-a-different-directory Http://stackoverflow.com/questions/185114/how-do-i-use-a-perl-module-in-a-directory-not-in-inc
In Fedora/rhel/centos, the library default installation path for Perl is:
@INC (@INC contains:/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/usr/lib/perl5/site_perl/5.8.8/usr /lib/perl5/site_perl/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/usr/lib/perl5/ve
How to Use hooklogger to find Memory leakage in the vc6 + Symbian 2 SDK Development Environment
1. Download hooklogger for free. We recommend that you install it on disk C. (Google it. The link provided now may not be available for download .)
2. Configure hooklogger. In fact, you do not need to configure epocroot environment variables, and directly overwrite the following content to C:/program files/common files/Symbian/tools/hookeuser. the PL (installation path will be different) files are all
database and determines whether the current operation is in the installation or upgrade by Schema_version.MogilefsdTracker the node process to complete the task assignment for the entire clusterProgram Code AnalysisCall ModuleUse Mogilefs::server;#!/usr/bin/perl ......# Rename binary in process list to make init scripts saner$ = "MOGILEFSD";My $s = mogilefs::server->server;$s->run;1;The program simply invokes the run subroutine in Mogilefs::server.The whole mogilefs is a event-based of cluster.
);
#正规的做法. Register the function to hash first.
my%fh;
$fh {"Hello"}=\hello;
$fh {"$fname"} (9); #再通过名字变量调用
#{$fh {"$fname"}} (9), #也可以
#反射的黑魔法
"Hello" (5); #允许. But no use
# $fname (); #strict不允许
#{$fname} (); #strict不允许
#\{$fname}-> (); #strict不允许
{\{$fname}} (6); #这么写可以, but a little hard to understand
my $fname 2 = \ {"Hello"}; #magictrick
$fname 2 (7);
My $fname 1 = \{$fname};
$fname 1 (8); #前面的 is required
3. The reflective module can be $mname by require; It's OK, but use not. Perl
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.